<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setCharacterEncoding("UTF-8");
	String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
</head>
<style>
select{width: 234px;height: 31px}
.gn_name{padding-top: 5px}
.div_zilei{width: 600px;padding-left: 90px;height: 30px}
.tr{height:40px;background: #a9bbe0}
.tr td{font-size: 14px;color: #ffffff}
.tr_td{height: 40px;}
.tr_td td{border-bottom: 1px solid #ededed;text-align: center;}
tr td:nth-child(1) {font-size: 14px;color: #cccccc}
.date{border: 0;background: #ffffff;text-align: center;}
.tr_td td:nth-child(1){border-left: 1px solid #cccccc;}
.tr_td td:nth-child(3){border-right: 1px solid #cccccc;}
.addTable.deleteTable.deleteCarname:HOVER{cursor:pointer;}
.findBtn{
	 background: #427dff,background;
	 border-radius: 50px;
	 background: -webkit-linear-gradient(top,#57a0ff,#57a1ff);
	 background: -moz-linear-gradient(top,#57a0ff,#57a1ff); 
 	 background: linear-gradient(top,#57a0ff,#57a1ff);
  	 background: -ms-linear-gradient(top,#57a0ff,#57a1ff);
  	 border: 1px solid #2576A8;
  	 box-shadow: 0 1px 2px #8AC1E2 inset,0 -1px 0 #57a0ff inset;
  	 color: #fff;
  	 height:40px;
     text-shadow: 1px 1px 0.5px #57a0ff;
     outline:none;
     margin-left: 100px
	}
	.findBtn:hover{
	background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);	
	}
	 .subtn2{
	 background:#57a0ff,background;
	 border-radius: 50px;
	 background: -webkit-linear-gradient(top,#57a0ff,#57a1ff);
	 background: -moz-linear-gradient(top,#57a0ff,#57a1ff); 
 	 background: linear-gradient(top,#57a0ff,#57a1ff);
  	 background: -ms-linear-gradient(top,#57a0ff,#57a1ff);
  	 border: 1px solid #2576A8;
  	 box-shadow: 0 1px 2px #8AC1E2 inset,0 -1px 0 #57a0ff inset;
  	 color: #fff;
  	 height:40px;
     text-shadow: 1px 1px 0.5px #22629B;
     outline:none;
    }
	.btn{
	 background: #57a0ff,background;
	 border-radius: 50px;
	 background: -webkit-linear-gradient(top,#57a0ff,#57a1ff);
	 background: -moz-linear-gradient(top,#57a0ff,#57a1ff); 
 	 background: linear-gradient(top,#57a0ff,#57a1ff);
  	 background: -ms-linear-gradient(top,#57a0ff,#57a1ff);
  	 border: 1px solid #2576A8;
  	 box-shadow: 0 1px 2px #8AC1E2 inset,0 -1px 0 #57a0ff inset;
  	 color: #fff;
  	 height:40px;
    text-shadow: 1px 1px 0.5px #22629B;
    outline:none;
  	}
  	

  	/* 按钮滑过样式 */
  	.subtn2:hover{
    background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
  	}
  	.btn:hover {
    background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
	}
	/* css代码 */
		/* 遮罩层 */
		#modal-overlay {
		  visibility: hidden;
		  position: fixed;
		  text-align: center;
		  filter: alpha(opacity=70); background-color: #000;     
          z-index: 100; left: 0px;  top: 0px;bottom: 0px; 
          width: 100%;
		  height: 100%;
          opacity:0.7; -moz-opacity:0.7;     
		  /* ease:逐渐慢下来；linear:匀速；ease-in:由慢到快；ease-out:由快到慢；ease-in-out:先慢到快再到慢*/
		}
.findBtn1:hover{
	background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);	
	}
.findBtn1{
	 background: #427dff,background;
	 border-radius: 50px;
	 background: -webkit-linear-gradient(top,#57a0ff,#57a1ff);
	 background: -moz-linear-gradient(top,#57a0ff,#57a1ff); 
 	 background: linear-gradient(top,#57a0ff,#57a1ff);
  	 background: -ms-linear-gradient(top,#57a0ff,#57a1ff);
  	 border: 1px solid #2576A8;
  	 box-shadow: 0 1px 2px #8AC1E2 inset,0 -1px 0 #57a0ff inset;
  	 color: #fff;
  	 height:40px;
     text-shadow: 1px 1px 0.5px #57a0ff;
     outline:none;
     margin-left: 100px
	}
.fseq{width: 20px;border: 0;text-align: center;color: #cccccc}
.modal-data2 {
			 visibility: hidden; 
			  z-index: 1001;
			  width: 1100px;
			  min-height: 500px;
			  margin: 100px auto;
			  background-color: #FFFFFF;
			 /* border: 1px solid #C80B14;*/
			 -moz-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
        	 -webkit-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
      /*         box-shadow:0 0 10px #cccccc; 
			  box-shadow: #cccccc; */
			  box-shadow: 0 10px 20px #57a1ff inset,0 -10px 0 #57a0ff inset;
			  padding: 5px;
			  text-align: center;
			  position: fixed;
			  left: 15%;
		}
		.modal-data2 td{padding-left: 15px;padding-right: 15px}
		.modal-data2 tr:FIRST-CHILD td{padding: 0px 10px;}
		.modal-data2 tr{padding-top: 30px}
		.modal-data2 form table {
			margin: 0px
		}
.modal-data1 {
			  visibility: hidden; 
			  z-index: 1001;
			  width: 1100px;
			  min-height: 500px;
			  margin: 100px auto;
			  background-color: #FFFFFF;
			 /* border: 1px solid #C80B14;*/
			 -moz-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
        	 -webkit-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
      /*         box-shadow:0 0 10px #cccccc; 
			  box-shadow: #cccccc; */
			  box-shadow: 0 10px 20px #57a1ff inset,0 -10px 0 #57a0ff inset;
			  padding: 5px;
			  text-align: center;
			  position: fixed;
			  left: 15%;
		}
		
		.modal-data1 td{padding-left: 15px;padding-right: 15px}
		.modal-data1 tr:FIRST-CHILD td{padding: 0px 10px;}
		.modal-data1 tr{padding-top: 30px}
		.modal-data1 form table {
			margin: 0px
		}		
/**按钮样式**/ 
	.subtn1{
	 background:#57a0ff,background;
	 border-radius: 50px;
	 background: -webkit-linear-gradient(top,#57a0ff,#57a1ff);
	 background: -moz-linear-gradient(top,#57a0ff,#57a1ff); 
 	 background: linear-gradient(top,#57a0ff,#57a1ff);
  	 background: -ms-linear-gradient(top,#57a0ff,#57a1ff);
  	 border: 1px solid #2576A8;
  	 box-shadow: 0 1px 2px #8AC1E2 inset,0 -1px 0 #57a0ff inset;
  	 color: #fff;
  	 height:40px;
     text-shadow: 1px 1px 0.5px #22629B;
     outline:none;
    }
    .subtn1:hover{
    background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
  	}
  .findBtn2{
	 background: #427dff,background;
	 border-radius: 50px;
	 background: -webkit-linear-gradient(top,#57a0ff,#57a1ff);
	 background: -moz-linear-gradient(top,#57a0ff,#57a1ff); 
 	 background: linear-gradient(top,#57a0ff,#57a1ff);
  	 background: -ms-linear-gradient(top,#57a0ff,#57a1ff);
  	 border: 1px solid #2576A8;
  	 box-shadow: 0 1px 2px #8AC1E2 inset,0 -1px 0 #57a0ff inset;
  	 color: #fff;
  	 height:40px;
     text-shadow: 1px 1px 0.5px #57a0ff;
     outline:none;
     margin-left: 100px
	}
	.findBtn2:hover{
	background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);	
	}
	.subtn:hover{
    background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
    background: linear-gradient(top, #8DC9EF, #4E9FD1);
    background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
  	}
  	
  	.subtn{
	 background: #57a0ff,background;
	 border-radius: 50px;
	 background: -webkit-linear-gradient(top,#57a0ff,#57a1ff);
	 background: -moz-linear-gradient(top,#57a0ff,#57a1ff); 
 	 background: linear-gradient(top,#57a0ff,#57a1ff);
  	 background: -ms-linear-gradient(top,#57a0ff,#57a1ff);
  	 border: 1px solid #2576A8;
  	 box-shadow: 0 1px 2px #8AC1E2 inset,0 -1px 0 #57a0ff inset;
  	 color: #fff;
  	 height:40px;
     text-shadow: 1px 1px 0.5px #57a0ff;
     outline:none;
    }
.modal-data {
			  visibility: hidden; 
			  z-index: 1001;
			  width: 830px;
			  min-height: 500px;
			  margin: 100px auto;
			  background-color: #FFFFFF;
			 /* border: 1px solid #C80B14;*/
			 -moz-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
        	 -webkit-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
      /*         box-shadow:0 0 10px #cccccc; 
			  box-shadow: #cccccc; */
			  box-shadow: 0 10px 20px #57a1ff inset,0 -10px 0 #57a0ff inset;
			  padding: 5px;
			  text-align: center;
			  position: fixed;
			  left: 23%;
		}
.modal-data td{padding-left: 15px;padding-right: 15px}
.modal-data tr:FIRST-CHILD td{padding: 0px 10px;}
.modal-data tr{padding-top: 30px}
.modal-data form table {margin: 0px}
</style>
<body style="background: #f5f5f5">
<div class="main">
<div id="modal-overlay">
			    
			</div>
		<div class="modal-data2">
				<div style="height: 60px">
				 <ul>
				  	<li  style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
				  		<span>名称：</span>
				  		<span>
				  		 	<input class="name" type="text" >
				  		</span>
				  		<span>
				  			<button class="findBtn">
				  				查询
				  			</button>
				  		</span>
				  	</li>
				 </ul>
				</div>
				<div style="width:1100px; height:350px; overflow:scroll;">
				      <form action="">
				        <table class="head2" style="width: auto;white-space:nowrap;border-spacing: 0px">
				        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
					        <td style="width: 20px"></td> 
					        <td>名称</td>
					        <td>编码</td>
					        <td>简称</td>
					        <td>描述</td>
					        <td>创建时间</td>
					        <td>用户名</td>
					        <td>最后修改时间</td>
					        <td>用户名</td>
					        <td>财务组织</td>
				        </tr>
				        <tr style="margin-top: 45px" >
				        	<td>
				        		 正在加载中...
				        	</td>
				       </tr>
				        
				        </table>
				      </form>
				</div>
				      <button class="subtn2" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;left: 170px" > 
				      	确定
				      </button>
				      <button class="btn" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;right: 170px" > 
				      	关闭
				      </button>
			</div>
			
			<div class="modal-data1">
				<div style="height: 60px">
				 <ul>
				  	<li  style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
				  		<span>名称：</span>
				  		<span>
				  		 	<input class="name1" type="text" >
				  		</span>
				  		<span>
				  			<button class="findBtn1">
				  				查询
				  			</button>
				  		</span>
				  	</li>
				 </ul>
				</div>
				<div style="width:1100px; height:350px; overflow:scroll;">
				      <form action="">
				        <table class="head1" style="width: auto;white-space:nowrap;border-spacing: 0px">
				        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
					        <td style="width: 20px"></td> 
					        <td>名称</td>
					        <td>编码</td>
					        <td>简称</td>
					        <td>描述</td>
					        <td>创建时间</td>
					        <td>用户名</td>
					        <td>最后修改时间</td>
					        <td>用户名</td>
					        <td>财务组织</td>
					        <td>入户日期</td>
					        <td>车架号</td>
					        <td>发动机号</td>
					        <td>年检到期日</td>
					        <td>交强险到期日</td>
					        <td>商业险到期日</td>
					        <td>二级维护到期日</td>
					        <td>综检到期日</td>
					        <td>保养到期日</td>
					        <td>科目三通行证到期日</td>
					        <td>所属机构</td>
					        <td>产地</td>
					        <td>品牌</td>
					        <td>保单号</td>
					        <td>商业险日期</td>
					        <td>交强险日期</td>
					        <td>年检日期</td>
					        <td>二级维护日期</td>
					        <td>综检险日期</td>
					        <td>保养日期</td>
					        <td>科目三通行证日期</td>
					        <td>购买价格</td>
					        <td>购买日期</td>
					        <td>理论油耗</td>
				        </tr>
				        <c:forEach items="${cars}" var="cars">
							<tr style="margin-top: 45px" class="car">
                            <td style="width: 20px"><input type="checkbox" class="check" name="car" value="${cars.fid}"
                                                           style="width: 15px"/></td>
					        <td>${cars.fnameL2}</td>
					        <td>${cars.fnumber}</td>
					        <td>${cars.fsimplename}</td>
					        <td>${cars.fdescriptionL2}</td>
					        <td>${cars.fcreatetime}</td>
					        <td>${cars.createName}</td>
					        <td>${cars.flastupdatetime}</td>
					        <td>${cars.updateName}</td>
					        <td>${cars.companyName}</td>
					        <td>${cars.cfrhrq}</td>
					        <td>${cars.cfcjh}</td>
					        <td>${cars.cffdjh}</td>
					        <td>${cars.cfnjdqr}</td>
					        <td>${cars.cfjqxdqr}</td>
					        <td>${cars.cfsyxdqr}</td>
					        <td>${cars.cfejwhdqr}</td>
					        <td>${cars.cfzjdqr}</td>
					        <td>${cars.cfbydqr}</td>
					        <td>${cars.cfkmstxzdqr}</td>
					        <td>${cars.deptName}</td>
					        <td>${cars.cfcd}</td>
					        <td>${cars.cfpp}</td>
					        <td>${cars.cfbdh}</td>
					        <td>${cars.cfsyxrq}</td>
					        <td>${cars.cfjqxrq}</td>
					        <td>${cars.cfnjrq}</td>
					        <td>${cars.cfejwhrq}</td>
					        <td>${cars.cfzjrq}</td>
					        <td>${cars.cfbyrq}</td>
					        <td>${cars.cfkmstxzrq}</td>
					        <td>${cars.cfgmjg}</td>
					        <td>${cars.cfgmrq}</td>
					        <td>${cars.cfllyh}</td>
				       </tr>
				        </c:forEach>
				        </table>
				      </form>
				</div>
				      <button class="subtn1" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;left: 170px" > 
				      	确定
				      </button>
				      <button class="btn" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;right: 170px" > 
				      	关闭
				      </button>
			</div>
			
			<div class="modal-data">
				<div style="height: 60px">
				 <ul>
				  	<li  style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
				  		<span>名称：</span>
				  		<span>
				  		 	<input class="userName" type="text" >
				  		</span>
				  		<span>
				  			<button class="findBtn2">
				  				查询
				  			</button>
				  		</span>
				  	</li>
				 </ul>
				</div>
				<div style="width:830px; height:350px; overflow:scroll;">
				      <form action="">
				        <table class="head" style="width: auto;white-space:nowrap;border-spacing: 0px">
				        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
					        <td style="width: 20px"></td> 
					        <td>编码</td>
					        <td>名称</td>
					        <td>组织单元长名称</td>
				        </tr>
				        <tr style="margin-top: 45px" >
				        	<td>
				        		 正在加载中...
				        	</td>
				       </tr>
				        
				        </table>
				      </form>
				</div>
				      <button class="subtn" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;left: 170px" > 
				      	确定
				      </button>
				      <button class="btn" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;right: 170px" > 
				      	关闭
				      </button>
			</div>
		
	<div class="weizhi">
		车辆基础资料>>职员基础资料>>修改
	</div>
	<div class="div_body" style="box-shadow: 0 0 5px #cccccc;height: 1000px">
		
			
	<div class="div_top">
			<ul>
				<li class="top_zl active">基本信息</li>
				<li class="top_zl">教练信息</li>
			</ul>
	</div>
		<div class="div_form">
			<form action="<%=path%>/DrivingSys/modifyPerson" class="form" onsubmit="return submit2();" method="post">
				<div class="jbxx">
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">驾校&nbsp;:&nbsp;</span>
							<input  type="text" name="name"  value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
							<input type="hidden" name="fid" value="${person.fid}"> 
						</div>
						<div class="input_hang">
							<span class="gn_name">系统用户&nbsp;:&nbsp;</span>
							<input type="text" class="cfsyspersonid2 is_click_ne" value="${person.userName}"/>
							<input  type="hidden" name="cfsyspersonid" id="cfsyspersonid"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">身高(厘米)&nbsp;:&nbsp;</span>
							<input type="text" name="cfheight" id="height" value="${person.cfheight}"/>
							<span style="font-size: 14px;color: red;display: none" class="haoyou" >请输入数字</span>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">部门&nbsp;:&nbsp;</span>
							<select name="cfpersondepid">
								<c:forEach items="${departments}" var="departments">
									 <c:choose>
								          <c:when test="${departments.fid eq person.cfpersondepid}">
								           	<option value="${person.cfpersondepid}" selected="selected">${person.cfpersondepName}</option>	  
								          </c:when>
								      <c:otherwise>
							          		<option value="${departments.fid}" style="font-size: 13px">${departments.fnameL2}</option>
							          </c:otherwise>
							          </c:choose>
								</c:forEach>
							</select>
						</div>
						<div class="input_hang">
							<span class="gn_name">员工类型&nbsp;:&nbsp;</span>
							<select style="width: 234px;height: 31px" name="cfpersontype">
								<c:if test="${person.cfpersontype == '1'}">
									<option value="1" selected>办公室职员</option>
									<option value="2">教练</option>
									<option value="3">其他</option>
								</c:if>
								<c:if test="${person.cfpersontype == '2'}">
									<option value="1">办公室职员</option>
									<option value="2" selected>教练</option>
									<option value="3">其他</option>
								</c:if>
								<c:if test="${person.cfpersontype == '3'}">
									<option value="1">办公室职员</option>
									<option value="2">教练</option>
									<option value="3" selected>其他</option>
								</c:if>
							</select>
						</div> 
						<div class="input_hang">
							<span class="gn_name">健康状况&nbsp;:&nbsp;</span>
							<select style="width: 234px;height: 31px" name="cfhealthid">
							<c:if test="${empty person.cfhealthid}">
								<option value=""></option>
							</c:if>
								<c:forEach items="${healthys}" var="s">
								<c:choose>
									<c:when test="${person.cfhealthid eq s.fid}">
										<option value="${s.fid}">${s.fnameL2}</option>
									</c:when>
									<c:otherwise>
										<option value="${s.fid}">${s.fnameL2}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">员工编号&nbsp;:&nbsp;</span>
							<input type="text" name="fnumber" value="${person.fnumber}" style="color: gray;"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">入职日期&nbsp;:&nbsp;</span>
							<input type="text" name="cfbegindate" id="cfbegindate" value="${person.cfbegindate}" onclick="WdatePicker({el:'cfbegindate',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfbegindate',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div> 
						<div class="input_hang">
							<span class="gn_name">婚姻状况&nbsp;:&nbsp;</span>
								<select name="cfwedid">
								<c:if test="${empty person.cfwedid}">
									<option value=""></option>
								</c:if>
									<c:forEach items="${marriages}" var="s">
									<c:choose>
										<c:when test="${person.cfwedid eq s.fid}">
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:when>
										<c:otherwise>
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:otherwise>
									</c:choose>
								</c:forEach>
								</select>
						</div> 
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">员工姓名&nbsp;:&nbsp;</span>
							<input type="text" name="fnameL2" value="${person.fnameL2}" class="username">
							<span class="required">必填</span>
						</div>
						<div class="input_hang">
							<span class="gn_name">转正日期&nbsp;:&nbsp;</span>
							<input type="text" id="cfstartdate" name="cfstartdate" value="${person.cfstartdate}" onclick="WdatePicker({el:'cfstartdate',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfstartdate',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div>
						<div class="input_hang">
							<span class="gn_name">职级职等&nbsp;:&nbsp;</span>
							<input type="text" name="cfjobgrade" id="zjzd" value="${person.positiongradeName}"
								   class="is_click_ne">
                            <input type="hidden" name="cfjobgradeid" id="cfjobgradeid" value="${person.cfjobgradeid}">
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">曾用名&nbsp;:&nbsp;</span>
							<input type="text" name="fnameL1" value="${person.fnameL1}">
						</div>
						<div class="input_hang">
							<span class="gn_name">离职日期&nbsp;:&nbsp;</span>
							<input type="text" id="cfenddate" name="cfenddate"  value="${person.cfenddate}" onclick="WdatePicker({el:'cfenddate',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfenddate',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div>
						<div class="input_hang">
							<span class="gn_name">薪酬调整&nbsp;:&nbsp;</span>
							<input type="text" name="cfxctz" value="${person.cfxctz}">
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">性别&nbsp;:&nbsp;</span>
							<select name="cfsex">
								<c:if test="${person.cfsex == '1' }">
									<option value="1">男</option>
									<option value="2">女</option>
								</c:if>
								<c:if test="${person.cfsex == '2' }">
									<option value="2">女</option>
									<option value="1">男</option>
								</c:if>
								<c:if test="${empty person.cfsex}">
									<option value="1">男</option>
									<option value="2">女</option>
								</c:if>
							</select>
						</div>
						<div class="input_hang">
							<span class="gn_name">合同到期时间&nbsp;:&nbsp;</span>
							<input type="text" id="cfhtdqsj" name="cfhtdqsj" value="${person.cfhtdqsj}" onclick="WdatePicker({el:'cfhtdqsj',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfhtdqsj',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div>
						<div class="input_hang">
							<span class="gn_name">政治面貌&nbsp;:&nbsp;</span>
							<select name="cfpoliticalfaceid">
								<c:if test="${empty person.cfpoliticalfaceid}">
									<option value=""></option>
								</c:if>
									<c:forEach items="${politicals}" var="s">
									<c:choose>
										<c:when test="${person.cfpoliticalfaceid eq s.fid}">
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:when>
										<c:otherwise>
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">身份证号&nbsp;:&nbsp;</span>
                            <input type="text" name="cfidcardno" value="${person.cfidcardno}" id="cfidcardno"
                                   onblur="cfidcardno2()">
						</div>
						<div class="input_hang">
							<span class="gn_name">毕业学校&nbsp;:&nbsp;</span>
							<input type="text"  name="cfgraduateschool" value="${person.cfgraduateschool}">
						</div>
						<div class="input_hang">
							<span class="gn_name">民族&nbsp;:&nbsp;</span>
							<select name="cffolkid">
								<c:if test="${empty person.cffolkid}">
									<option value=""></option>
								</c:if>
									<c:forEach items="${familyNames}" var="s">
									<c:choose>
										<c:when test="${person.cffolkid eq s.fid}">
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:when>
										<c:otherwise>
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">手机号码&nbsp;:&nbsp;</span>
							<input type="text"  name="cfcell" value="${person.cfcell}">
						</div>
						<div class="input_hang">
							<span class="gn_name">专业&nbsp;:&nbsp;</span>
							<input type="text"  name="cfspecialty" value="${person.cfspecialty}">
						</div>
						<div class="input_hang">
							<span class="gn_name">社保编号&nbsp;:&nbsp;</span>
							<input type="text"  name="cfaccountsno" value="${person.cfaccountsno}">
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">出生日期&nbsp;:&nbsp;</span>
							<input type="text" id="cfbirthday" name="cfbirthday" value="${person.cfbirthday}" onclick="WdatePicker({el:'cfbirthday',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfbirthday',dateFmt:'yyyy-MM-dd'})"
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
						</div>
						<div class="input_hang">
							<span class="gn_name">最高学历&nbsp;:&nbsp;</span>
							<select name="cfmaxdegreeid">
								<c:if test="${empty person.cfmaxdegreeid}">
									<option value=""></option>
								</c:if>
									<c:forEach items="${edcations}" var="s">
									<c:choose>
										<c:when test="${person.cfmaxdegreeid eq s.fid}">
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:when>
										<c:otherwise>
											<option value="${s.fid}">${s.fnameL2}</option>
										</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>
						</div>
						<div class="input_hang">
							<span class="gn_name">社会保险记录&nbsp;:&nbsp;</span>
							<textarea rows="4" cols="30" name="cfshjljl" >${person.cfshjljl}</textarea>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">备注&nbsp;:&nbsp;</span>
							<input type="text"  name="fdescriptionL2" value="${person.fdescriptionL2}">
						</div>
						<div class="input_hang">
							<span class="gn_name">地址&nbsp;:&nbsp;</span>
							<input type="text" name="cfaddress" value="${person.cfaddress}">
						</div>
					</div>
					<div class="div_input_hang" style="padding-top: 20px">
						<div class="input_hang">
							<span class="gn_name">岗位异动&nbsp;:&nbsp;</span>
							<textarea rows="4" cols="30" name="cfgwyd">${person.cfgwyd}</textarea>
						</div>
						<div class="input_hang">
							<span class="gn_name">请假记录&nbsp;:&nbsp;</span>
							<textarea rows="4" cols="30" name="cfqjjl">${person.cfqjjl}</textarea>
						</div>
						<div class="input_hang">
							<span class="gn_name">违纪奖励记录&nbsp;:&nbsp;</span>
							<textarea rows="4" cols="30" name="cfwjjljl">${person.cfwjjljl}</textarea>
						</div>
					</div>
					<div class="div_input_hang" style="padding-top: 30px">
						<div class="input_hang">
							<span class="gn_name">计算招生提成&nbsp;:&nbsp;</span>
							<c:if test="${person.cfzstc == '1' }">
								<input type="checkbox" name="fcts2" checked="checked" id="fcts2" style="width: 15px">
							</c:if>
							<c:if test="${person.cfzstc == '0' }">
								<input type="checkbox" name="fcts2"  id="fcts2" style="width: 15px">
							</c:if>
							<c:if test="${empty person.cfzstc}">
								<input type="checkbox" name="fcts2"  id="fcts2" style="width: 15px">
							</c:if>
							<input type="hidden" name="cfzstc" id="fcts">
						</div>
						<div class="input_hang">
							<span class="gn_name">计算培训提成&nbsp;:&nbsp;</span>
							<c:if test="${person.cfzstc == '1' }">
								<input type="checkbox" name="fcpx2" checked="checked" id="fcpx2" style="width: 15px">
							</c:if>
							<c:if test="${person.cfzstc == '0' }">
								<input type="checkbox" name="fcpx2" id="fcpx2" style="width: 15px">
							</c:if>
							<c:if test="${empty person.cfzstc}">
								<input type="checkbox" name="fcpx2" id="fcpx2" style="width: 15px">
							</c:if>
							<input type="hidden" name="cfpxtc" id="fcpx">
						</div>
					</div>
				</div>
				<div class="jlxx" style="display: none;">
					<div class="div_input">
						<span class="gn_name">车辆&nbsp;:&nbsp;</span>
						<input type="text" class="car is_click_ne" id="carName" value="${person.cfcarName}">
						<input type="hidden" name="cfcarid" id="carFid" value="${person.cfcarid}">
							<img src="<%=path%>/image/delete212.png" class="deleteCarname" >
							<span class="deleteCarname" style="color: #a9bbe0;font-size: 14px" class="deleteCarname">删除车辆</span>
					</div>
					<div class="div_input">
						<span class="gn_name">初次领证时间&nbsp;:&nbsp;</span>
						<input type="text" id="cfcclzsj" name="cfcclzsj" value="${person.cfcclzsj}" onclick="WdatePicker({el:'cfcclzsj',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfcclzsj',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
					</div>
					<div class="div_input">
						<span class="gn_name">教练证有效期开&nbsp;:&nbsp;</span>
						<input type="text" id="cfjlzyxqs" name="cfjlzyxqs" value="${person.cfjlzyxqs}" onclick="WdatePicker({el:'cfjlzyxqs',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfjlzyxqs',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
					</div>
					<div class="div_input">
						<span class="gn_name">教练证有效期止&nbsp;:&nbsp;</span>
						<input type="text" id="cfjlzyxqz" name="cfjlzyxqz" value="${person.cfjlzyxqz}" onclick="WdatePicker({el:'cfjlzyxqz',dateFmt:'yyyy-MM-dd'})">
							<img onclick="WdatePicker({el:'cfjlzyxqz',dateFmt:'yyyy-MM-dd'})" 
				            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
					</div>
					<div class="div_input">
						<span class="gn_name">准教证号&nbsp;:&nbsp;</span>
						<input type="text" name="cfzjzh" value="${person.cfzjzh}">
					</div>
					<div class="div_input">
						<span class="gn_name">准教范围&nbsp;:&nbsp;</span>
						<input type="text" name="cfzjfw" value="${person.cfzjfw}">
					</div>			
					<div class="div_input">
						<span class="gn_name">是否VIP教练&nbsp;:&nbsp;</span>
							<c:if test="${person.cfzstc == '1' }">
								<input type="checkbox" name="cfisvip2" checked="checked" id="cfisvip2" style="width: 15px">
							</c:if>
							<c:if test="${person.cfzstc == '0' }">
								<input type="checkbox" name="cfisvip2" id="cfisvip2" style="width: 15px">
							</c:if>
							<c:if test="${empty person.cfzstc}">
								<input type="checkbox" name="cfisvip2" id="cfisvip2" style="width: 15px">
							</c:if>
						<input type="hidden" name="cfisvip" id="cfisvip">
					</div>
					<div class="div_zilei">
                        <div style="width: 200px;text-align: left;float: left;color: #444444;font-size: 14px;"></div>
							<div style="width: 530px;text-align: right;float: left: ;">
								<img src="<%=path%>/image/insert2323.jpg" class="addTable">
								<span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
								<img src="<%=path%>/image/delete212.png" class="deleteTable">
								<span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
							</div>
						</div>
						<div style="overflow:auto;height: 240px;width: 34.8%;padding-left: 90px">
								<table  width="100%" align="center" id="table1" style="min-height:50px;overflow:hidden;border-spacing:0;">
									<tr  class="tr">
										<td  width="20px"></td>
										<td  width="20px"></td>
										<td width="200px" align="center">科目</td>
										<td width="200px" align="center">车型</td>
									</tr>
									<c:forEach items="${personEntrys}" var="personEntrys">
										<tr align='left' class='tr_td'>
										<td><input type="checkbox" name="check2" style="width: 15px"></td>
										<td><input type="text" name="fseq" class="fseq" value="${personEntrys.fseq}" readonly="readonly"></td>
											<td>
												<select name='cfkemu'>
													<c:if test="${empty personEntrys.cfkemu}">
														<option value="1">科目一</option>
														<option value="2">科目二</option>
														<option value="3">科目三</option>
													</c:if>
													<c:if test="${personEntrys.cfkemu == '1'}">
														<option value="1">科目一</option>
														<option value="2">科目二</option>
														<option value="3">科目三</option>
													</c:if>
													<c:if test="${personEntrys.cfkemu == '2'}">
														<option value="2">科目二</option>
														<option value="1">科目一</option>
														<option value="3">科目三</option>
													</c:if>
													<c:if test="${personEntrys.cfkemu == '3'}">
														<option value="3">科目三</option>
														<option value="2">科目二</option>
														<option value="1">科目一</option>
													</c:if>
												</select>
											</td>
											<td>
												<select name="cfcartype">
													<c:forEach items="${carTypes}" var="s">
														<c:choose>
															<c:when test="${personEntrys.cfcartype eq s}">
																<option value="${s}" selected="selected">${s}</option>
															</c:when>
															<c:otherwise>
																<option value="${s}">${s}</option>
															</c:otherwise>
														</c:choose>
													</c:forEach>
												</select>
											</td>
										</tr>
									</c:forEach>
								</table>
						</div>
				</div>
				<div class="div_tj" style="padding-top: 0px">
					<div>
						<input onclick="chcek()" class="input_submit bc" value="" type="submit">
					</div>
					<div>
						<input type="button" class="input_back fh" value="" onclick="back()"/>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp"%>
<script type="text/javascript">
$(".top_zl").click(function(){
	$(".top_zl.active").removeClass("active")
	$(this).addClass("active")
	var name = $(this).text();
	if(name == '基本信息'){
		$(".jbxx").css("display","block")
		$(".jlxx").css("display","none")
	}else{
		$(".jbxx").css("display","none")
		$(".jlxx").css("display","block")
	}
})

//清空车辆名称
   $(".deleteCarname").click(function () {
       //清空汽车名称
       var _elements=$("#carName"),
           _elementsLen=_elements.length,
           _ei=null,
           i=0;
       for(;i<_elementsLen;i++) {
           _ei = _elements[i];
           //如果是文本类型，将其修改为空
           (_ei.type == "text" || _ei.type == "textarea") && (_ei.value = "");

       }
       //清空carfid
       $("#carFid").val("    ")
   })

//返回
function back() {
    parent.closeSelectCard()

    //location = '<%=path%>/DrivingSys/queryPerson/look.action';
}

//阻止表单提交
function submit2(){
	var name = $(".username").val();
	if(name == null || name == ''){
		alert("名称不能未空")
		return false
	}
    //提交后把提交变成不可用，可阻止表单重复提交
    $("input[type='submit']").attr("disabled", "disabled");
}

$(".addTable").click(function(){
	 var tr_len = $("#table1 tr").length;//表格长度
	 var str = "<tr align='left' class='tr_td'><td><input type='checkbox' name='check2' style='width: 15px'></td><td><input type='text' name='fseq' class='fseq' value="+tr_len+" readonly='readonly'></td>";
	 str += "<td><select name='cfkemu'><option value='1'>科目一</option><option value='2'>科目二</option><option value='3'>科目三</option></select></td>"
	 $.ajax({
		 url:'<%=path%>/DrivingSys/selectCarTypeAll', 
		 type: "post",
		 dataType:"json",    
		 success:function(json){
			 str += '<td><select name="cfcartype">'
			 for(var i=0;i<json.length;i++){
				 str +='<option value="'+json[i]+'">'+json[i]+'</option>'
			 }
			 str += '</select></td></tr>'
			 $("#table1").append(str)
		 },
		 error:function(){aletr("错误")}
	 })
})

//删除一行
$(".deleteTable").click(function(){
	var tr_len = $("#table1 tr").length;
	if(tr_len == 1){
		
	}else{
		var s;
		$('input:checkbox[name=check2]').each(function(i) {
			if($(this).is(':checked')){
				$(this).parent().parent().remove();
				s = '1';
			}
		})
		
		//判断是否选中
		if(s == null || s == ''){
			alert("请选择一条数据删除");
			return false;
		}
		//重新排序
		$('#table1 tr td .fseq').each(function(i) {
			var s = i*1 + 1*1;
			$(this).val(s);
			//$(this).parent().next().find("input").attr("id",'jx'+s);
		})
	}
})

$("#height").blur(function(){
		//只能输入数字和小数点
		var re = /^\d+(?=\.{0,1}\d+$|$)/ 
		//理论油耗的值
		var height = $(this).val();
		//判断只能输入数字和小数点
		if(height == ""){
			$(".haoyou").css("display","none");
		}else if(!re.test(height)){
			$(".haoyou").css("display","inline");
			$(this).val("")
		}else{
			$(".haoyou").css("display","none");
		}
	})
	
//判断复选框是否选中
 function chcek(){
	if($('#cfisvip2').is(':checked')) {
	    $("#cfisvip").val("1");
	}else{
		$("#cfisvip").val("0");
	}
	
	if($('#fcts2').is(':checked')) {
	    $("#fcts").val("1");
	}else{
		$("#fcts").val("0");
	}
	
	if($('#fcpx2').is(':checked')) {
	    $("#fcpx").val("1");
	}else{
		$("#fcpx").val("0");
	}
}

//查询职级职等
$("#zjzd").click(function(){
	 $.ajax({
		    url:'<%=path%>/DrivingSys/selectZjzd', 
		    type: "post",
		    data:{},
		    dataType:"json",         	
		    success: function(json) {
		         var str=''
		         for(var i=0;i<json.length;i++) {
		            str+='<tr style="margin-top: 45px" class="zjzd"><td><input style="width: 15px;height: 15px" '
		            str+='type="checkbox" name="person" class="check" value="'+json[i].fid+'"></td>'
		            if(json[i].fnameL2 == null){
		            	str+='<td class="zjzdName"></td>'	
		            }else{
		     	    	str+='<td class="zjzdName">'+json[i].fnameL2+'</td>'
		            }
		            if(json[i].fnumber == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].fnumber+'</td>'
		            }
		            if(json[i].fsimplename == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].fsimplename+'</td>'
		            }
		            if(json[i].fdescriptionL2 == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].fdescriptionL2+'</td>'
		            }
		            if(json[i].fcreatetime == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].fcreatetime+'</td>'
		            }
		            if(json[i].createName == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].createName+'</td>'
		            }
		            if(json[i].flastupdatetime == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].flastupdatetime+'</td>'
		            }
		            if(json[i].updateName == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].updateName+'</td>'
		            }
		            if(json[i].companyName == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].companyName+'</td>'
		            }
			        str+='</tr>'
		         }
		        
		         $(".head2 tr:not(':first')").remove()
		         $('.head2').append(str) 
			},  
			error: function(){alert('Error');} 
			});
	 
	 	$('#modal-overlay').css('visibility','visible') 
		$('.modal-data2').css('visibility','visible')
})

//取消
$('.btn').click(function(){
		$('#modal-overlay').css('visibility','hidden')
		//$('.modal-data').css('visibility','hidden')
		$('.modal-data1').css('visibility','hidden')
		$('.modal-data2').css('visibility','hidden')
		$('.modal-data').css('visibility','hidden')
	})

//根据名称查询职级职等
$('.findBtn').click(function(){
	 var name=$('.name').val()
		 $.ajax({
			    url:'<%=path%>/DrivingSys/selectZjzdByName', 
			    type: "post",
			    data:{'name':name},
			    dataType:"json",         	
			    success: function(json) {
			         var str=''
			         for(var i=0;i<json.length;i++) {
			            str+='<tr style="margin-top: 45px" class="zjzd"><td><input style="width: 15px;height: 15px" '
			            str+='type="checkbox" name="person" class="check" value="'+json[i].fid+'"></td>'
			            if(json[i].fnameL2 == null){
			            	str+='<td class="zjzdName"></td>'	
			            }else{
			     	    	str+='<td class="zjzdName">'+json[i].fnameL2+'</td>'
			            }
			            if(json[i].fnumber == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].fnumber+'</td>'
			            }
			            if(json[i].fsimplename == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].fsimplename+'</td>'
			            }
			            if(json[i].fdescriptionL2 == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].fdescriptionL2+'</td>'
			            }
			            if(json[i].fcreatetime == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].fcreatetime+'</td>'
			            }
			            if(json[i].createName == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].createName+'</td>'
			            }
			            if(json[i].flastupdatetime == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].flastupdatetime+'</td>'
			            }
			            if(json[i].updateName == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].updateName+'</td>'
			            }
			            if(json[i].companyName == null){
			            	str+='<td></td>'	
			            }else{
			     	    	str+='<td>'+json[i].companyName+'</td>'
			            }
				        str+='</tr>'
			         }
			        
			         $(".head2 tr:not(':first')").remove()
			         $('.head2').append(str) 
				},  
				error: function(){alert('Error');} 
 	 			});
	    $('#modal-overlay').css('visibility','visible') 
		$('.modal-data2').css('visibility','visible')
	})

//单击选中职级职等
$(".zjzd td").live('click',function(){
    $('input:checkbox[name=person]:checked').each(function(i) {
    	$(this).removeAttr("checked");
     });
     $(this).parent().find("input:checkbox").attr('checked','checked');
}) 
	
	//选择数据
	$(".subtn2").click(function(){
		/* var stringFid = new Array();  */
		var fid = "";
	      $('input:checkbox:checked').each(function(i){
		       if(0==i){
		    	   fid = $(this).val();
		       }
	      });  	
	      if(fid==""){
	    	  alert("请选择一条数据")
	    	  return false
	      }else{
			  $.ajax({
				  url:'<%=path%>/DrivingSys/selectZjzdByFid', 
				  type: "post",
				  data:{'fid':fid},
				  dataType:"json",
				  success:function(json){
					  $("#zjzd").val(json.fnameL2)
					  $("#cfjobgradeid").val(fid)
				  },  
					error: function(){alert('Error');} 
			  })
	      }
		  $('#modal-overlay').css('visibility','hidden')
		  $('.modal-data2').css('visibility','hidden')
		  $('.modal-data1').css('visibility','hidden')
    });
    
//双击确定职级职等
$(document).on('dblclick','.zjzd td',function(){
	var fid = $(this).parent().find("input[name=person]").val();
	$.ajax({
		url:'<%=path%>/DrivingSys/selectZjzdByFid', 
		type: "post",
		data:{'fid':fid},
		dataType:"json",
		success:function(json){
			$("#zjzd").val(json.fnameL2)
			$("#cfjobgradeid").val(fid)
		},  
		error: function(){alert('错误');} 
	})
	 $('#modal-overlay').css('visibility','hidden')
	 $('.modal-data2').css('visibility','hidden')
	 $('.modal-data1').css('visibility','hidden')
})

$('.car').click(function(){
	$('#modal-overlay').css('visibility','visible')
	$('.modal-data1').css('visibility','visible')
})

//单击选中
$(".car td").live('click',function(){
    $('input:checkbox[name=car]:checked').each(function(i) {
    	$(this).removeAttr("checked");
     });
     $(this).parent().find("input:checkbox").attr('checked','checked');
}) 

//根据名称查询车辆
$('.findBtn1').click(function(){
	 var name=$('.name1').val()
		 $.ajax({
			    url:'<%=path%>/DrivingSys/selCarByName', 
			    type: "post",
			    data:{'name':name},
			    dataType:"json",         	
			    success: function(json) {
	            var str=''
	            for(var i=0;i<json.length;i++) {
	            	 str+='<tr style="margin-top: 45px;height: 30px;" class="car"><td><input style="width: 15px;height: 15px" '
	  	             str+='type="checkbox" value="'+json[i].fid+'" name="car"></td>'
	               if( json[i].fnameL2 == null){
	        	   		str+='<td></td>'
	               }else{
	            		str+='<td>'+json[i].fnameL2+'</td>'  
	               }
	               if(json[i].fnumber == null){
	            		str+='<td></td>'	
	               }else{
	                	str+='<td>'+json[i].fnumber+'</td>'   
	               }
	               if(json[i].fsimplename != null){
		            	str+='<td>'+json[i].fsimplename+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].fdescriptionL2 != null){
		            	str+='<td>'+json[i].fdescriptionL2+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].fcreatetime != null){
		            	str+='<td>'+json[i].fcreatetime+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].flastupdatetime != null){
		            	str+='<td>'+json[i].flastupdatetime+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].updateName != null){
		            	str+='<td>'+json[i].updateName+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].companyName != null){
		            	str+='<td>'+json[i].companyName+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfrhrq != null){
		            	str+='<td>'+json[i].cfrhrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfcjh != null){
		            	str+='<td>'+json[i].cfcjh+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cffdjh != null){
		            	str+='<td>'+json[i].cffdjh+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfnjdqr != null){
		            	str+='<td>'+json[i].cfnjdqr+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfjqxdqr != null){
		            	str+='<td>'+json[i].cfjqxdqr+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfsyxdqr != null){
		            	str+='<td>'+json[i].cfsyxdqr+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfejwhdqr != null){
		            	str+='<td>'+json[i].cfejwhdqr+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfzjdqr != null){
		            	str+='<td>'+json[i].cfzjdqr+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfbydqr != null){
		            	str+='<td>'+json[i].cfbydqr+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfkmstxzdqr != null){
		            	str+='<td>'+json[i].cfkmstxzdqr+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].deptName != null){
		            	str+='<td>'+json[i].deptName+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfcd != null){
		            	str+='<td>'+json[i].cfcd+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfpp != null){
		            	str+='<td>'+json[i].cfpp+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfbdh != null){
		            	str+='<td>'+json[i].cfbdh+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfsyxrq != null){
		            	str+='<td>'+json[i].cfsyxrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfjqxrq != null){
		            	str+='<td>'+json[i].cfjqxrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfnjrq != null){
		            	str+='<td>'+json[i].cfnjrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfnjrq != null){
		            	str+='<td>'+json[i].cfnjrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfejwhrq != null){
		            	str+='<td>'+json[i].cfejwhrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfzjrq != null){
		            	str+='<td>'+json[i].cfzjrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfbyrq != null){
		            	str+='<td>'+json[i].cfbyrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfkmstxzrq != null){
		            	str+='<td>'+json[i].cfkmstxzrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfgmjg != null){
		            	str+='<td>'+json[i].cfgmjg+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfgmrq != null){
		            	str+='<td>'+json[i].cfgmrq+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               if(json[i].cfllyh != null){
		            	str+='<td>'+json[i].cfllyh+'</td>'	
		           }else{
		                str+='<td></td>'   
		           }
	               str+='</tr>';
	            }
	            $(".head1 tr:not(':first')").remove()
	            $('.head1').append(str)
				},  
 				error: function(){alert('Error');} 
 	 		});
		
	})		
	
	//选择数据
	$(".subtn1").click(function(){
		/* var stringFid = new Array();  */
		var fid = "";
	      $('input:checkbox:checked').each(function(i){
		       if(0==i){
		    	   fid = $(this).val();
		       }
	      });  	
	      if(fid==""){
	    	  alert("请选择一条数据")
	    	  return false
	      }else{
			  $.ajax({
				  url:'<%=path%>/DrivingSys/selCarByFid', 
				  type: "post",
				  data:{'fid':fid},
				  dataType:"json",
				  success:function(json){
					  $("#carName").val(json.fnumber)
					  $("#carFid").val(fid)
				  },  
					error: function(){alert('Error');} 
			  })
	      }
		  $('#modal-overlay').css('visibility','hidden')
		  $('.modal-data2').css('visibility','hidden')
		  $('.modal-data1').css('visibility','hidden')
    });
  
//双击确定车辆
$(document).on('dblclick','.car td',function(){
    var fid = $(this).parent().find("input[name='car']").val();
	$.ajax({
		url:'<%=path%>/DrivingSys/selCarByFid', 
		type: "post",
		data:{'fid':fid},
		dataType:"json",
		success:function(json){
			$("#carName").val(json.fnumber)
			$("#carFid").val(fid)
		},  
		error: function(){alert('错误');} 
	})
	  $('#modal-overlay').css('visibility','hidden')
	  $('.modal-data2').css('visibility','hidden')
	  $('.modal-data1').css('visibility','hidden')
})
  
  //查询系统用户
  $(".cfsyspersonid2").click(function(){
			 $.ajax({
				    url:'<%=path%>/DrivingSys/selectUser', 
				    type: "post",
				    data:{},
				    dataType:"json",         	
				    success: function(json) {
				         var str=''
				         for(var i=0;i<json.length;i++) {
				            str+='<tr style="margin-top: 45px;height:30px" class="xtyh"><td><input style="width: 15px;height: 15px" '
				            str+='type="checkbox"  class="check" value="'+json[i].fid+'" name="xtyh"></td>'
				            if(json[i].name == null){
				            	str+='<td></td>'	
				            }else{
				     	    	str+='<td>'+json[i].name+'</td>'
				            }
				            if(json[i].fnumber == null){
				            	str+='<td></td>'	
				            }else{
				     	    	str+='<td>'+json[i].fnumber+'</td>'
				            }
				            if(json[i].fdisplayname == null){
				            	str+='<td></td>'	
				            }else{
				     	    	str+='<td>'+json[i].fdisplayname+'</td>'
				            }
					        str+='</tr>'
				         }
				        
				         $(".head tr:not(':first')").remove()
				         $('.head').append(str) 
					},  
					error: function(){alert('Error');} 
					});
			 
			 	$('#modal-overlay').css('visibility','visible') 
				$('.modal-data').css('visibility','visible')
  })
   //根据名称查询系统用户
  $(".findBtn2").click(function(){
	  var name = $('.userName').val()
	  $.ajax({
		    url:'<%=path%>/DrivingSys/selectUserByName', 
		    type: "post",
		    data:{'name':name},
		    dataType:"json",         	
		    success: function(json) {
		         var str=''
		         for(var i=0;i<json.length;i++) {
		            str+='<tr style="margin-top: 45px;height:30px" class="xtyh"><td><input style="width: 15px;height: 15px" '
		            str+='type="checkbox"  class="check" value="'+json[i].fid+'" name="xtyh"></td>'
		            if(json[i].name == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].name+'</td>'
		            }
		            if(json[i].fnumber == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].fnumber+'</td>'
		            }
		            if(json[i].fdisplayname == null){
		            	str+='<td></td>'	
		            }else{
		     	    	str+='<td>'+json[i].fdisplayname+'</td>'
		            }
			        str+='</tr>'
		         }
		        
		         $(".head tr:not(':first')").remove()
		         $('.head').append(str) 
			},  
			error: function(){alert('Error');} 
			});
	 
	 	$('#modal-overlay').css('visibility','visible') 
		$('.modal-data').css('visibility','visible')
  })
  
  //单击选中系统用户
$(".xtyh td").live('click',function(){
    $('input:checkbox[name=xtyh]:checked').each(function(i) {
    	$(this).removeAttr("checked");
     });
     $(this).parent().find("input:checkbox").attr('checked','checked');
}) 
  	//选择数据
	$(".subtn").click(function(){
		/* var stringFid = new Array();  */
		var fid = "";
	      $('input:checkbox:checked[name=xtyh]').each(function(i){
		       if(0==i){
		    	   fid = $(this).val();
		       }
	      });  	
	      if(fid==""){
	    	  alert("请选择一条数据")
	    	  return false
	      }else{
			  $.ajax({
				  url:'<%=path%>/DrivingSys/selUserByFid', 
				  type: "post",
				  data:{'fid':fid},
				  dataType:"json",
				  success:function(json){
					  $(".cfsyspersonid2").val(json.name)
					  $("#cfsyspersonid").val(fid)
				  },  
					error: function(){alert('Error');} 
			  })
	      }
		  $('#modal-overlay').css('visibility','hidden')
		  $('.modal-data2').css('visibility','hidden')
		  $('.modal-data1').css('visibility','hidden')
		  $('.modal-data').css('visibility','hidden')
    });

  //双击选中系统用户
$(document).on('dblclick','.xtyh td',function(){
	 var fid = $(this).parent().find("input[name=xtyh]").val();
	$.ajax({
		url:'<%=path%>/DrivingSys/selUserByFid', 
		type: "post",
		data:{'fid':fid},
		dataType:"json",
		success:function(json){
			$(".cfsyspersonid2").val(json.name)
			$("#cfsyspersonid").val(fid)
		},  
		error: function(){alert('错误');} 
	})
	 var fid = $(this).parent().find("input[name=train]").val();
	 $('#modal-overlay').css('visibility','hidden')
	 $('.modal-data2').css('visibility','hidden')
	 $('.modal-data1').css('visibility','hidden')
	 $('.modal-data').css('visibility','hidden')
  })

//验证身份证号码
function cfidcardno2() {
    var isIDCard = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|x)$/
    if ($('#cfidcardno').val() == '' || $('#cfidcardno').val() == null) {

    } else if (!isIDCard.test($('#cfidcardno').val())) {
        alert('请填写正确的身份证')
        return false
    }
}
</script>
</html>